<template>
 <RouterLink to="/">Home</RouterLink> |
 <RouterLink to="/about">About</RouterLink> |
 <RouterLink to="/help1">帮助</RouterLink> |
 <RouterLink :to="{name:'about'}">name-关于</RouterLink> |
 <RouterLink :to="{path:'/about'}">path-关于2</RouterLink>
<hr>
<button @click="go1">按钮-帮助</button>
<hr>
<!-- <RouterView /> -->
<router-view />
</template>

<script setup>
import { RouterLink, RouterView, useRouter } from 'vue-router'

const router = useRouter();
const go1 = ()=>{
    // path
    // router.push('/help1');
    // router.push({
    //     path:'/help1'
    // });
     router.replace({
        path:'/help1'
    });
}
</script>